package com.eshore.norm.pattern.builder.demo1;

/**
 * 客户端
 *
 * @author: v-chenjl62
 * @date: 2024/2/1 10:45
 */
public class Client {
    public static void main(String[] args) {
        //盖普通房子
        //准备创建房子的指挥者
        HouseDirector houseDirector=new HouseDirector(new CommonHouseBuilder());
        //完成盖房子，返回产品(普通房子)
        House commonHouse  = houseDirector.constructHouse();
        System.out.println("普通房子：" + commonHouse .toString());

        System.out.println("-------------------------------------------------------------------------------");

        ///盖高楼
        //重置建造者，改成修高楼
        HouseDirector houseDirector2=new HouseDirector(new HignHouseBuilder());
        //完成盖房子，返回产品(高楼)
        House highBuilding = houseDirector2.constructHouse();
        System.out.println("高楼：" + highBuilding.toString());

    }

}
